//
//  RBFooterRefresh.m
//  TryShoppingHD
//
//  Created by Mr.Lee on 16/8/10.
//  Copyright © 2016年 Reabam. All rights reserved.
//

#import "RBFooterRefresh.h"
@interface RBFooterRefresh()
/** logo */
@property (nonatomic, weak) UIImageView *logo;

@property (nonatomic, weak) UIView *v1;
@property (nonatomic, weak) UILabel *l;
@property (nonatomic, weak) UILabel *l1;
@property (nonatomic, weak) UILabel *l2;
@end
@implementation RBFooterRefresh


// 初始化
- (void)prepare
{
    [super prepare];
    
//    UIView *v1 = [[UIView alloc] init];
//    v1.backgroundColor = [UIColor redColor];
//    v1.frame = CGRectMake(0, 10, 100, 1);
//    self.v1 = v1;
//    [self addSubview:v1];
//    
//    self.stateLabel.textColor = TSBlackColor;
////    self.stateLabel.text = @"继续拖动或点击查看图文详情";
//    self.stateLabel.backgroundColor = qianhuiColor;
//    //    self.stateLabel.font
//    //    [self setTitle:@"abc" forState:MJRefreshStateIdle];
//    //    [self setTitle:@"ddd" forState:MJRefreshStateRefreshing];
//    
////    UIImageView *logo = [[UIImageView alloc] init];
////    logo.contentMode = UIViewContentModeCenter;
////    logo.image = [UIImage imageNamed:@"MainTitle"];
////    [self addSubview:logo];
////    self.logo = logo;
//    
////    UILabel *l = [[UILabel alloc] init];
//    
//    [self setTitle:@"继续拖动或点击查看图文详情" forState:MJRefreshStateIdle];

    
    UIView *v = [[UIView alloc] init];
    v.backgroundColor = [UIColor whiteColor];
    self.v1 = v;
    [self.stateLabel addSubview:v];
    
    
    
    UILabel *l = [[UILabel alloc] init];
    l.backgroundColor = [UIColor blackColor];
    self.l = l;
    [v addSubview:l];
    
    
    UILabel *l1 = [[UILabel alloc] init];
    l1.backgroundColor = [UIColor redColor];
    l1.text = @"继续拖动或点击查看图文详情";
    self.l1 = l1;
    [v addSubview:l1];
    
    
    UILabel *l2 = [[UILabel alloc] init];
    l2.backgroundColor = [UIColor blackColor];
    self.l2 = l2;
    [v addSubview:l2];
}

// 摆放子控件
- (void)placeSubviews
{
    [super placeSubviews];

    
    self.v1.frame = CGRectMake(0, 0, self.width, self.height);
    [_l mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(@1);
        make.left.equalTo(@0);
        make.width.equalTo(@100);
        make.centerY.equalTo(self.v1.mas_centerY);
        
    }];
    
    
    [_l2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(@1);
        make.right.equalTo(self.mas_right);
        make.width.equalTo(@50);
        make.centerY.equalTo(self.v1.mas_centerY);
        
    }];
    
    [_l1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.height.equalTo(self.mas_height);
        make.left.equalTo(self.l.mas_right);
        //        make.width.equalTo(@100);
        make.right.equalTo(self.l2.mas_left);
        make.centerY.equalTo(self.v1.mas_centerY);
        
    }];
}
@end
